import { Controller, Post, Body, Headers } from '@nestjs/common';
import { AuthService } from './auth.service';
import { Public } from 'src/utils/public.decorator';

@Controller('auth')
export class AuthController {
  constructor(private readonly authService: AuthService) {}

  @Public()
  @Post('/signUp')
  signUp(@Body() body) {
    return this.authService.signUp(body);
  }

  @Public()
  @Post('/login')
  login(@Body() body, @Headers() headers) {
    console.log(headers);

    return this.authService.login(body);
  }
}
